#ifndef __DRV_TOUCH_H_
#define __DRV_TOUCH_H_

#ifdef __cplusplus
extern "C"
{
#endif

#include "system.h"


#define TOUCH_POINT_MAX   10      // 触摸屏最大支持点数

enum
{
    TOUCH_STA_NONE = 0,
    TOUCH_STA_UP,
    TOUCH_STA_DOWN,
    TOUCH_STA_MOVE,
    TOUCH_STA_MAX,
};

typedef struct
{
    uint8_t sta;
    uint16_t x;
    uint16_t y;
} _drv_touch_point_info_t;


typedef struct
{
    uint8_t cnt;
    _drv_touch_point_info_t point[TOUCH_POINT_MAX];

} _drv_touch_point_t;

typedef struct
{
    const char *name;
    uint16_t width;
    uint16_t height;
    uint16_t id;
} _drv_touch_info_t;

typedef struct
{
    int (*init)(void);
    int (*scan)(_drv_touch_point_t *pos);
    int (*get_info)(_drv_touch_info_t *info);


} _drv_touch_opt_t;

/* export func */

int drv_touch_init(void);


int drv_touch_scan(_drv_touch_point_t *pos);

int drv_touch_get_info(_drv_touch_info_t *info);


#ifdef __cplusplus
}
#endif

#endif // __DRV_TOUCH_H_
